import React, { Component } from 'react';
import PubSub from 'pubsub-js'
import { meshLog, SPRemove, SPGet, SPSet } from '../../../config';
import { DatePicker } from 'antd';
// import moment from 'moment';
// import 'moment/locale/zh-cn';
// moment.locale('zh-cn');

import './wonderful.less'
const { RangePicker } = DatePicker;



export default class statistics extends Component {
  constructor(a) {
    super(a);
    this.state = {

    }
  }
  componentWillUnmount() {

  }
  componentDidMount() {
    meshLog("wonderful",);

  }
  Changediv1 = () => {
    const div1 = document.getElementById("div1");
    div1.style.display = "block";
    const bt1 = document.getElementById("bt1");
    bt1.style.borderBottomColor = "#1C7DFF";
    const bt2 = document.getElementById("bt2");
    bt2.style.borderBottomColor = "white";

    const div2 = document.getElementById("div2");
    div2.style.display = "none";
  };
  Changediv2 = () => {
    const div2 = document.getElementById("div2");
    div2.style.display = "block";
    const bt1 = document.getElementById("bt1");
    bt1.style.borderBottomColor = "white";
    const bt2 = document.getElementById("bt2");
    bt2.style.borderBottomColor = "#1C7DFF";
    const div1 = document.getElementById("div1");
    div1.style.display = "none";
  };
  onChange = (info) => {
    console.log('RangePicker:', info);

  };
  onBlur = () => {
    meshLog('123',);
  };

  render() {
    return (
      <div className="wonderful" >
        <div className="wonderfuldaohang">
          <span className='wonderfuldaohangzuo' >位置： 用户服务 》精彩瞬间</span>
        </div>
        <div className="wonderfulneirong">
          <div className="tupiannei" >
            <div className="wonderfulbiao">
              <button className='bt' onClick={() => { this.Changediv() }}>全部</button>
              <button id="bt1" className='bt1' onClick={() => { this.Changediv1() }}>图片</button>
              <button id="bt2" className='bt2' onClick={() => { this.Changediv2() }}>视频</button>
              <span className='zuixin'>最新</span>
              <span className='shijian'>选择时间</span>
              <RangePicker id='RangePicker' placeholder={['开始时间', '结束时间']} onChange={(_d, info) => { this.onChange(info) }} />
            </div>
            {/* <Divider /> */}
            <div id="div1" className="Changediv1">
              <h2>待调试待更新</h2>
            </div>
            <div id="div2" className="Changediv2">
              <h2>待调试待更新</h2>
            </div>
          </div>

        </div>
      </div >
    )
  }
}
